<template>
	<view class="top">
		<uni-nav-bar   left-text="返回" right-text="添加" @clickRight="add()" title="我的房屋" />
		<view class="body2" v-for="(item) in housescheck2">
			<view class="room">
				<text>{{item.building}}</text>

				<text style="color: red;">{{item.stateName}}</text>
			</view>
			<view class="message">
					<text>房号</text>
					<text>{{item.houseno}}</text>
			</view>
			<view class="message">
					<text>姓名</text>
					<text>{{item.name}}</text>
			</view>
			<view class="message">
					<text>电话</text>
					<text>{{item.mobile}}</text>
			</view>
			<view class="message" style="border-bottom: 1rpx solid #eeeeee">
					<text>住户类型</text>
					<text>{{item.usertypeName}}</text>
			</view>
			<view class="bottom">
				<text>2021-10-10 12:08</text>
				<view>
					<view>
						删除
					</view>
				</view>
			</view>
	</view>
	</view>
</template>

<script>
	import require from '../../utils/request.js'
	import {houseslist,housescheck} from '../../api/houses.js'

	export default{
		data(){
			return{
				houseslist2:[],
				housescheck2:[]
			}
		},
		onLoad() {
			this.gethouseslist()
			this.gethousescheck()
		},
		methods:{
			add(){
				uni.navigateTo({
					url:'/pages/houses/housesCheck'
				})
			},
			async gethouseslist(){
				let data = await houseslist();
				console.log(data)
				this.houseslist2 = data.data.list
			},
			async gethousescheck(){
				let data = await housescheck();
				console.log(data)
				this.housescheck2 = data.data.list
			},
		}
	}	

	
</script>
 
<style>
	@import './../../static/style/house.less';

</style>
